package com.danawa.watcher.util;

import org.apache.commons.lang.math.NumberUtils;


public class StringUtil {
	
	/**
	 * Integer String 변환
	 * @param anInt
	 * @return
	 */
	public static String toString( Integer anInt ) {
		if(anInt == null){
			anInt = 0;
		}
		return Integer.toString( anInt );
	}
	
	/**
	 * int parameter 를 반환한다. 없으면 0 으로 반환.
	 *
	 * @param request
	 * @param paramName
	 * @return
	 */
	public static int toInt(String val) {
		return NumberUtils.toInt(val.replaceAll(",",""), 0);
	}
	
}
